#pragma once

#include <string>

#include "TxDNN/txdnn.h"
#include "TxDNN/common.h"
#include "macros/object.h"
#include "macros/errors.h"

#include "utils/logger/logger_internal.h"

/* void* and const void* alias */
using Data_t = void*;
using ConstData_t = const void*;


// txdnn::ILogger* logger_ = initLogger();

/* Data Type */
inline std::string GetDataType(txdnnDataType_t type) {
  std::string ret;
  switch (type) {
    case txdnnDataType_t::TXDNN_DATA_FLOAT:               { ret = "float";    break; }
    case txdnnDataType_t::TXDNN_DATA_DOUBLE:              { ret = "double";   break; }
    case txdnnDataType_t::TXDNN_DATA_HALF:                { ret = "half";     break; }
    case txdnnDataType_t::TXDNN_DATA_INT8:                { ret = "int8";     break; }
    case txdnnDataType_t::TXDNN_DATA_INT32:               { ret = "int32";    break; }
    case txdnnDataType_t::TXDNN_DATA_UINT8:               { ret = "uint8";    break; }
    case txdnnDataType_t::TXDNN_DATA_BFLOAT16:            { ret = "bfloat16"; break; }
    case txdnnDataType_t::TXDNN_DATA_INT64:               { ret = "int64";    break; }
    case txdnnDataType_t::TXDNN_DATA_BOOLEAN:             { ret = "bool";     break; }
    case txdnnDataType_t::TXDNN_DATA_FP8_E4M3:            { ret = "fp8_e4m3"; break; }
    case txdnnDataType_t::TXDNN_DATA_FP8_E5M2:            { ret = "fp8_e5m2"; break; }
    case txdnnDataType_t::TXDNN_DATA_FAST_FLOAT_FOR_FP8:  { ret = "fp8_fast"; break; }
    case txdnnDataType_t::TXDNN_DATA_NOT_SET:             { ret = "not_set";  break; }
  }

  return ret;
}
